﻿using System.Windows;
using System.Windows.Input;
using Oxage.Models;

namespace Oxage
{
	public partial class SimulatorWindow : Window
	{
		#region Constructor
		public SimulatorWindow()
		{
			InitializeComponent();
			ViewModel.Driver = sim;

			this.KeyDown += (sender, e) =>
			{
				switch (e.Key)
				{
					case Key.L:
						ViewModel.TestLinearMovement();
						break;

					case Key.A:
						ViewModel.TestArcMovement();
						break;

					case Key.B:
						ViewModel.TestLine();
						break;

					case Key.D:
						ViewModel.TestDiagonal();
						break;
				}
			};
		}
		#endregion

		#region Public properties
		public SimulatorWindowViewModel ViewModel
		{
			get
			{
				return this.DataContext as SimulatorWindowViewModel;
			}
		}
		#endregion
	}
}
